from commons.public_gobals import PublicGlobals
from mes.GetBluetoothAddressBySN import GetBluetoothAddressBySN


def MES_get_BT_MAC():
    flag,BT_MAC = GetBluetoothAddressBySN(barCode=PublicGlobals.sn_Seq, url=PublicGlobals.url)
    if flag:        # 如果获取地址成功，更新全局变量中的BT地址
        PublicGlobals.BT_MAC = BT_MAC
    return PublicGlobals.BT_MAC

